%% This file is cvthemexepersian-casual.sty (modified version of moderncvthemecasual.sty)
%%
%% Copyright 2009 by Vafa Khalighi
%%
%%%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%%
%%
%%
%% start of file `moderncvthemecasual.sty'.
%% Copyright 2007 Xavier Danaux (xdanaux@gmail.com).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cvthemexepersian-casual}[2009/04/01 v0.1 modern Persian curriculum vitae style in XeLaTeX (Author: Vafa Khalighi): xepersian-casual]
\DeclareOption{blue}{}
\newif\if@colourorange\@colourorangefalse
\DeclareOption{orange}{\@colourorangetrue}
\newif\if@colourgreen\@colourgreenfalse
\DeclareOption{green}{\@colourgreentrue}
\newif\if@colourred\@colourredfalse
\DeclareOption{red}{\@colourredtrue}
\newif\if@colourgrey\@colourgreyfalse
\DeclareOption{grey}{\@colourgreytrue}
\DeclareOption*{
  \PackageWarning{cvthemexepersian-casual}{Unknown option ‘\CurrentOption’}}
\ExecuteOptions{colour}
\ProcessOptions\relax
\renewcommand*{\listitemsymbol}{\textbullet}
\familynamecolour{808080}
\firstnamecolour{A9A9A9}
\quotecolour{696969}
\addresscolour{696969}
\definecolor{sectionrectanglecolour}{rgb}{0.25,0.50,0.75}
\sectiontitlecolour{1E90FF}
\subsectioncolour{4682B4}
\definecolor{rulecolour}{gray}{0.6}
\definecolor{footersymbolcolour}{rgb}{0.25,0.50,0.75}
\if@colourorange
  \definecolor{sectionrectanglecolour}{rgb}{1.00,0.65,0.20}
  \sectiontitlecolour{FF8C00}
  \subsectioncolour{FF8C00}
  \definecolor{footersymbolcolour}{rgb}{0.95,0.55,0.15}\fi
\if@colourgreen
  \definecolor{sectionrectanglecolour}{rgb}{0.55,0.85,0.35}
  \sectiontitlecolour{008000}
  \subsectioncolour{008000}
  \definecolor{footersymbolcolour}{rgb}{0.30,0.65,0.15}\fi
\if@colourred
  \definecolor{sectionrectanglecolour}{rgb}{1.00,0.30,0.30}
  \sectiontitlecolour{FF0000}
  \subsectioncolour{FF0000}
  \definecolor{footersymbolcolour}{rgb}{0.95,0.20,0.20}\fi
\if@colourgrey
  \definecolor{sectionrectanglecolour}{rgb}{0.75,0.75,0.75}
  \sectiontitlecolour{808080}
  \subsectioncolour{808080}
  \definecolor{footersymbolcolour}{rgb}{0.35,0.35,0.35}\fi
\renewcommand*{\ttdefault}{pcr}
\renewcommand*{\firstnamefont}{\fontsize{38}{40}\mdseries\upshape}
\renewcommand*{\familynamefont}{\firstnamefont}
\renewcommand*{\addressfont}{\normalsize\mdseries\slshape}
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
\renewcommand*{\maketitle}{%
  {\beginL%
    \ifthenelse{\isundefined{\@photo}}%
      {}%
      {{\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
    \hfill%
%    
    \raggedleft{\beginR\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}\endR}\endL\\[-.35em]}%
  {\beginL\psline[linewidth=2pt,linecolor=rulecolour](-11.2,-0.2)(5.6,-0.2)\endL\\[2.5em]}%
% optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
  }%
\newif\if@firstfooterelement\@firstfooterelementtrue
\providecommand*{\footersymbol}{}
\renewcommand*{\footersymbol}{%
  \if@firstfooterelement%
  \else%
    { ~~\beginL\psdot[linecolor=footersymbolcolour](0,0.1)\endL~~~}\fi}
\providecommand*{\makefooter}{}
\renewcommand*{\makefooter}{%
  \fancypagestyle{plain}{%
    \fancyfoot[c]{%
      \parbox{0.8\textwidth}{%
      \centering%
      \addressfont\@addresscolour%
      \ifthenelse{\isundefined{\@address}}{}{%
        \beginR\addresssymbol~\@address\endR\\%
        \@firstfooterelementfalse}%
      \beginR\ifthenelse{\isundefined{\@mobile}}{}{\beginR\mobilesymbol~\@mobile\endR\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\beginR\phonesymbol~\@phone\endR\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\beginR\faxsymbol~\@fax\endR\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@email}}{}{\footersymbol\beginR\emailsymbol~\emaillink{\@email}\endR\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\beginR\footersymbol\@extrainfo\endR\@firstfooterelementfalse}\endR}}%
  }%
  \pagestyle{plain}}
\AtBeginDocument{\makefooter}
\endinput
